﻿<UserControl x:Class="Administratation.Views.OffersBrowser"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>

            <GroupBox Header="Browse Offers " Grid.Row="0" Margin="0,10,0,0">
                <StackPanel>
                    <ListView ItemsSource="{Binding Offers}" DisplayMemberPath="JobTitle" Width="150" Height="228"
                              IsSynchronizedWithCurrentItem="True" HorizontalAlignment="Left" VerticalAlignment="Top">
                    </ListView>
                </StackPanel>
            </GroupBox>

            <GroupBox Header="Offer Details"  Grid.Column="1" Margin="0,10,0,0">
                <StackPanel DataContext="{Binding Path=SelectedOffer}">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="60" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        
                        <TextBlock Grid.Column="0" Grid.Row="0" Text="Offer Title: " />
                        <TextBlock Grid.Column="1" Grid.Row="0" Text="{Binding JobTitle}" />

                        <TextBlock Grid.Column="0" Grid.Row="1" Text="Status: " />
                        <TextBlock Grid.Column="1" Grid.Row="1" Text="{Binding Status.Name}" />

                        <TextBlock Grid.Column="0" Grid.Row="2" Text="Country: " />
                        <TextBlock Grid.Column="1" Grid.Row="2" Text="{Binding Country.Name}" />

                        <TextBlock Grid.Column="0" Grid.Row="3" Text="Town: " />
                        <TextBlock Grid.Column="1" Grid.Row="3" Text="{Binding Town.Name}" />
                    </Grid>
                </StackPanel>
            </GroupBox>
        </Grid>
    </Grid>
</UserControl>
